<template>
  <a-dropdown>
    <el-button type="info" :icon="icon">
      {{ title }}
    </el-button>
    <template #overlay>
      <a-menu>
        <slot></slot>
      </a-menu>
    </template>
  </a-dropdown>
</template>
<script lang="ts" setup>
/* 更多菜单
// 用法     
<MkButtonMore> 
  <a-menu-item @click="invalidate">作废</a-menu-item> 
</MkButtonMore>
<MkButtonMore title="打印" icon="ele-Printer">  
  <a-menu-item @click="print">打印</a-menu-item>        
</MkButtonMore>
*/
defineOptions({
  name: 'MkButtonMore',
});

// 定义组件接收的属性
const props = defineProps({
  title: {
    type: String,
    default: '更多'
  },
  icon: {
    type: String,
    default: 'ele-More'
  }
})
</script>
